package com.sina.weibo;

import android.content.Context;
import android.content.res.Resources;
import android.graphics.drawable.Drawable;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.BaseAdapter;
import android.widget.ImageView;
import android.widget.TextView;
import java.util.List;

public class MoreItemsAdapter extends BaseAdapter
{
  private Context context;
  private List<Integer> imageList;
  private LayoutInflater inflater;
  private int lastItemPosition = 0;
  private List<String> textList;

  public MoreItemsAdapter(Context paramContext, List<Integer> paramList, List<String> paramList1)
  {
    this.context = paramContext;
    this.imageList = paramList;
    this.textList = paramList1;
    LayoutInflater localLayoutInflater = LayoutInflater.from(paramContext);
    this.inflater = localLayoutInflater;
  }

  public int getCount()
  {
    int i = this.imageList.size() - 1;
    this.lastItemPosition = i;
    return this.imageList.size();
  }

  public Object getItem(int paramInt)
  {
    return Integer.valueOf(paramInt);
  }

  public long getItemId(int paramInt)
  {
    return paramInt;
  }

  public View getView(int paramInt, View paramView, ViewGroup paramViewGroup)
  {
    ViewHolder localViewHolder;
    if (paramView == null)
    {
      paramView = this.inflater.inflate(2130903064, null);
      localViewHolder = new ViewHolder();
      TextView localTextView1 = (TextView)paramView.findViewById(2131624046);
      localViewHolder.textView = localTextView1;
      ImageView localImageView1 = (ImageView)paramView.findViewById(2131624045);
      localViewHolder.imageView = localImageView1;
      ImageView localImageView2 = (ImageView)paramView.findViewById(2131624047);
      localViewHolder.imageView2 = localImageView2;
      paramView.setTag(localViewHolder);
    }
    while (true)
    {
      TextView localTextView2 = localViewHolder.textView;
      CharSequence localCharSequence = (CharSequence)this.textList.get(paramInt);
      localTextView2.setText(localCharSequence);
      localViewHolder.textView.setTextSize(20.0F);
      ImageView localImageView3 = localViewHolder.imageView;
      Resources localResources = paramView.getResources();
      int i = ((Integer)this.imageList.get(paramInt)).intValue();
      Drawable localDrawable1 = localResources.getDrawable(i);
      localImageView3.setImageDrawable(localDrawable1);
      ImageView localImageView4 = localViewHolder.imageView2;
      Drawable localDrawable2 = paramView.getResources().getDrawable(2130838097);
      localImageView4.setImageDrawable(localDrawable2);
      int j = this.lastItemPosition;
      if (paramInt == j)
        paramView.setBackgroundResource(2130837962);
      return paramView;
      localViewHolder = (ViewHolder)paramView.getTag();
    }
  }
}

/* Location:           D:\Program Files\eclipse\apktool-r01-3\新浪微博\classes.dex.dex2jar.jar
 * Qualified Name:     com.sina.weibo.MoreItemsAdapter
 * JD-Core Version:    0.6.0
 */